gnomeos: Initial work on switching to Yocto
authorColin Walters <walters@verbum.org>
Sun, 13 Nov 2011 00:21:10 +0000 (19:21 -0500)
committerColin Walters <walters@verbum.org>
Sun, 13 Nov 2011 00:21:10 +0000 (19:21 -0500)
gnomeos/yocto/README.md [new file with mode: 0644]
gnomeos/yocto/conf/layer.conf [new file with mode: 0644]
gnomeos/yocto/recipies-core/NetworkManager/NetworkManager.inc [new file with mode: 0644]
gnomeos/yocto/recipies-core/NetworkManager/NetworkManager/0001-configure-Allow-specifying-with-distro-generic.patch [new file with mode: 0644]
gnomeos/yocto/recipies-core/NetworkManager/NetworkManager_0.8.997.bb [new file with mode: 0644]
gnomeos/yocto/recipies-core/images/gnomeos-image.bb [new file with mode: 0644]

diff --git a/gnomeos/yocto/README.md b/gnomeos/yocto/README.md
new file mode 100644 (file)
index 0000000..3af3b50
--- /dev/null
@@ -0,0 +1,38 @@
+Setup
+-----
+
+We're going to be using Yocto.  You probably want to refer to:
+http://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html
+
+The first part of this setup just repeats that.
+
+Choose a directory for git sources, and a different directory for
+builds. I use: /src/ for git checkouts, and /src/build for builds.
+
+Get a Yocto checkout:
+
+cd /src
+git clone -b edison git://git.yoctoproject.org/poky.git
+
+mkdir -p /src/build/gnomeos
+cd /src/build/gnomeos
+. oe-init-build-env
+
+If you want at this point, you can run 'bitbake core-image-minimal'
+and you'll get an image bootable in QEMU.  However, our next step
+is to set up the gnomeos layer on top.
+
+You'll need a checkout of ostree:
+
+cd /src
+git clone git://git.gnome.org/ostree
+
+Now, edit /src/build/gnomeos/build/conf/layers.conf
+
+Add /src/ostree/gnomeos/yocto as a layer.  I also recommend editing
+conf/local.conf and doing the following:
+
+ * remove tools-profile and tools-testapps from EXTRA_IMAGE_FEATURES
+ * choose useful values for BB_NUMBER_THREADS, PARALLEL_MAKE
+
+
diff --git a/gnomeos/yocto/conf/layer.conf b/gnomeos/yocto/conf/layer.conf
new file mode 100644 (file)
index 0000000..414d8b2
--- /dev/null
@@ -0,0 +1,7 @@
+BBPATH := "${BBPATH}:${LAYERDIR}"
+
+BBFILES := "${BBFILES} ${LAYERDIR}/packages/*/*.bb ${LAYERDIR}/recipies-*/*/*.bb" 
+
+BBFILE_COLLECTIONS += "gnomeos"
+BBFILE_PATTERN_gnomeos := "^${LAYERDIR}/"
+BBFILE_PRIORITY_gnomeos = "6"
diff --git a/gnomeos/yocto/recipies-core/NetworkManager/NetworkManager.inc b/gnomeos/yocto/recipies-core/NetworkManager/NetworkManager.inc
new file mode 100644 (file)
index 0000000..54fcd1e
--- /dev/null
@@ -0,0 +1,14 @@
+SUMMARY = "NetworkManager"
+HOMEPAGE = "http://projects.gnome.org/NetworkManager/"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=cbbffd568227ada506640fe950a4823b"
+
+DEPENDS = "wpa-supplicant ppp glib-2.0 dbus-glib util-linux"
+
+SRC_URI = "http://ftp.acc.umu.se/pub/GNOME/sources/NetworkManager/0.8/NetworkManager-${PV}.tar.bz2 \
+           file://0001-configure-Allow-specifying-with-distro-generic.patch \
+          "
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--with-distro=generic"
diff --git a/gnomeos/yocto/recipies-core/NetworkManager/NetworkManager/0001-configure-Allow-specifying-with-distro-generic.patch b/gnomeos/yocto/recipies-core/NetworkManager/NetworkManager/0001-configure-Allow-specifying-with-distro-generic.patch
new file mode 100644 (file)
index 0000000..6f2d268
--- /dev/null
@@ -0,0 +1,26 @@
+From 0c2a325a19dc80097bebd86fe77dfc0bfbcdaab6 Mon Sep 17 00:00:00 2001
+From: Colin Walters <walters@verbum.org>
+Date: Mon, 28 Mar 2011 17:17:35 -0400
+Subject: [PATCH] configure: Allow specifying --with-distro=generic
+
+This option is useful if we simply don't need any legacy integration.
+---
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 98e2b04..b940d50 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -128,7 +128,7 @@ if test "z$with_distro" = "z"; then
+       exit 1
+ else
+       case $with_distro in
+-              redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|exherbo) ;;
++              generic|redhat|suse|gentoo|debian|slackware|arch|paldo|frugalware|mandriva|pardus|linexa|exherbo) ;;
+               *)
+                       echo "Your distribution (${with_distro}) is not yet supported!  (patches welcome)"
+                       exit 1
+-- 
+1.7.4
+
diff --git a/gnomeos/yocto/recipies-core/NetworkManager/NetworkManager_0.8.997.bb b/gnomeos/yocto/recipies-core/NetworkManager/NetworkManager_0.8.997.bb
new file mode 100644 (file)
index 0000000..83b1112
--- /dev/null
@@ -0,0 +1,4 @@
+require NetworkManager.inc
+
+SRC_URI[md5sum] = "9013a046e49a9d7e384a94290f40f28a"
+SRC_URI[sha256sum] = "332cdd94f480099d23f39d56b3aee9925e435ffe91d088a9476d9b8b3586887a"
diff --git a/gnomeos/yocto/recipies-core/images/gnomeos-image.bb b/gnomeos/yocto/recipies-core/images/gnomeos-image.bb
new file mode 100644 (file)
index 0000000..8cd5a45
--- /dev/null
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2011 Red Hat, Inc.
+#
+IMAGE_LINGUAS = " "
+
+LICENSE = "LGPL2"
+
+inherit core-image
+
+PACKAGES = "\
+       task-gnomeos-base \
+       "
+
+RDEPENDS_task-gnomeos-base = "\
+       gtk+ \
+       mesa-dri \
+       task-core-x11 \
+       NetworkManager \
+       "
+
+# remove not needed ipkg informations
+ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ; "
+
+gnomeos_rootfs_postinst() {
+       echo "GNOME OS Unix login" > ${IMAGE_ROOTFS}/etc/issue
+}
+
+ROOTFS_POSTPROCESS_COMMAND += " gnomeos_rootfs_postinst ; "